//
//  ContactCell.h
//
//  Created by Olof Millberg on 2010-04-06.
//  Copyright 2010 __MyCompanyName__. All rights reserved.
//

#import <AddressBookUI/AddressBookUI.h>
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import "WOPerson.h"

@protocol WOContactCellDelegate;

@interface ContactCell : UITableViewCell <ABPersonViewControllerDelegate>
{
	UILabel *contactName;
	UIButton *contactButton;
	UIButton *deleteButton;
	WOPerson *contactPerson;
	UIViewController *viewController;
	UIImage *contactImage;
	BOOL editable;
	id<WOContactCellDelegate> delegate;
}
@property (nonatomic, retain) IBOutlet UILabel *contactName;
@property (nonatomic, retain) IBOutlet UIButton *contactButton;
@property (nonatomic, retain) IBOutlet UIButton *deleteButton;
@property (nonatomic, retain) IBOutlet UIImage *contactImage;
@property (nonatomic, retain) WOPerson *contactPerson;
@property (nonatomic, retain) UIViewController *viewController;
@property (nonatomic, assign) BOOL editable;
@property (nonatomic, assign) id<WOContactCellDelegate> delegate;

- (IBAction) viewContact;
- (IBAction) deleteContact;
- (IBAction) select;
- (IBAction) deselect;

- (ABRecordRef) getABRecordRefFromAB:(ABAddressBookRef)addressBook;

@end

@protocol WOContactCellDelegate

- (void) contactCellDeleteButtonPressed:(ContactCell*)aContactCell;

@end